package me.zhengjie.modules.hanzi.rest;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.utils.Result;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.HashMap;
import java.util.Map;

@Slf4j
@Tag(name = "汉字学习", description = "汉字学习系统入口")
@RestController
@RequestMapping("/api/hanzi")
@RequiredArgsConstructor
public class HanziController {

    @Operation(summary = "获取系统信息")
    @GetMapping("/info")
    public Result<Map<String, Object>> getSystemInfo() {
        Map<String, Object> info = new HashMap<>();
        info.put("name", "汉字学习系统");
        info.put("version", "1.0.0");
        info.put("description", "提供汉字学习、分类管理和用户进度跟踪功能");

        Map<String, String> endpoints = new HashMap<>();
        endpoints.put("汉字管理", "/api/characters");
        endpoints.put("分类管理", "/api/categories");
        endpoints.put("用户进度", "/api/user");
        info.put("endpoints", endpoints);

        return Result.ok(info);
    }
} 